{template 'member','header'}
<script type="text/javascript" src="images/js/validator.js"></script>
<div id="main">
  {template 'order' , 'left'}
  <div id="right">
    <p id="position"> <strong>当前位置：</strong><a href="">首页</a><a href="{$MODULE[member][url]}">会员中心</a><a href="{$M[url]}">订单</a><a href="{$M[url]}deliver.php">收货地址</a>修改收货地址</p>
<form action="{$M[url]}deliver.php?action=edit&deliverid={$deliverid}" method="post" name="myform" id ="myform">
<input type="hidden" name="forward" id="forward" value="{$forward}">
<table cellpadding="0" cellspacing="1" id="editdeliver" class="table_form" style="display:">
    <caption>修改收货地址</caption>
	  <tr>
        <th width="15%"><font color="red">*</font> 配送区域：</th>
        <td>
            <input type="hidden" name="d[areaid]" id="areaid" value="{$areaid}">
	  {if $areaid}
			<span id="areaname" style="cursor:pointer;" onClick="this.style.display='none';$('#reselect_areaid').show();">{$AREA[$areaid][name]} <font color="red">点击重选</font></span>
			<span id="reselect_areaid" style="display:none;">
			<span id="load_areaid"></span> 
			<a href="javascript:areaid_reload();">重选</a>
			</span>
	  {else}
			<span id="load_areaid"></span>
			<a href="javascript:areaid_reload();">重选</a>
	  {/if}
        </td> 
      </tr>
      <tr>
        <th><font color="red">*</font> 收货人：</th>
        <td><input type="text" name="d[consignee]" id="consignee" value="{$consignee}" size="12" require="true" datatype="require" msg="请填写收货人"/></td>       
      </tr>
	  <tr>
        <th><font color="red">*</font> 电话：</th>
        <td><input type="text" name="d[telephone]" id="telephone" value="{$telephone}" size="20" require="true" datatype="custom" regexp="^[\d|\-|\+]{3,20}$"  msg="请填写正确的电话" msgid="telephone_notice"/> 格式：010-10000000-801 <span id="telephone_notice"></span></td>     
      </tr>
	  <tr>
        <th><font color="red">*</font> 手机：</th>
        <td><input type="text" name="d[mobile]" id="mobile" value="{$mobile}" size="20" require="true" datatype="mobile" msg="请填写正确的手机" msgid="mobile_notice"/> 格式：13800000000 <span id="mobile_notice"></span></td>       
      </tr>
	  <tr>
        <th><font color="red">*</font> 地址：</th>
        <td><input type="text" name="d[address]" id="address" value="{$address}" size="60" require="true" datatype="require" msg="填写正确的地址"/></td>       
      </tr>
      <tr>
        <th><font color="red">*</font> 邮编：</th>
        <td><input type="text" name="d[postcode]" id="postcode" value="{$postcode}" size="8" require="true" datatype="zip" msg="填写正确的邮编" msgid="postcode_notice"/> 格式：100000 <span id="postcode_notice"></span></td>       
      </tr>
      <tr>
        <th></th>
        <td><input type="submit" name="dosubmit" value=" 确定 "/> <input type="reset" name="reset" value=" 重置 "/></td>       
      </tr>
</table>
   </form>	
  </div>
</div>
<div class="clear"></div>
{template 'phpcms','footer'}
<script language="javascript" type="text/javascript">
$().ready(function() {
	  $('form').checkForm(1);
});

function areaid_load(id)
{
	$.get("load.php", { field: 'areaid', id: id }, function(data){
		$('#load_areaid').append(data);
	});
}

function areaid_reload()
{
	$('#load_areaid').html('');
	areaid_load(0);
}
areaid_reload();
</script>